﻿/***************************************************************************
 创建者: 华磊
 开始时间: 2019.9.20
 copyright: (C) 华友高科
 ***************************************************************************/
#include "mappoint.h"

MapPoint::MapPoint(int _id, std::string _name, Map_Point_Type _type, double _x, double _y,
    double _realX, double _realY, double _realA, int _labelXoffset, int _labelYoffset, bool _mapChange, bool _locked, std::string _ip, int _port, int _agvType, std::string _lineId):
    MapSpirit(_id,_name,Map_Sprite_Type_Point),
    x(_x),
    y(_y),
    labelXoffset(_labelXoffset),
    labelYoffset(_labelYoffset),
    mapChange(_mapChange),
    locked(_locked),
    realX(_realX),
    realY(_realY),
    realA(_realA),
    point_type(_type),
    ip(_ip),
    port(_port),
    agvType(_agvType),
    lineId(_lineId)
{
    poseType=E_POSITION_TYPE_COMMON;
    actionCommand="";
}

MapPoint::~MapPoint()
{
}


MapSpirit *MapPoint::clone()
{
    MapPoint *p = new MapPoint(this->getId(),this->getName(),this->getPointType(),
                            this->getX(),this->getY(),this->getRealX(),this->getRealY(),
                               this->getRealA(),this->getLabelXoffset(),this->getLabelYoffset(),
                               this->getMapChange(),this->getLocked(), this->getIp(),this->getPort(),
                               this->getAgvType(),this->getLineId());
    p->setPoseType(this->getPoseType());
    return p;
}
